constexpr auto serverHasValidSubscriptionC = "serverHasValidSubscription";
constexpr auto generalC = "General";
-constexpr auto isVfsEnabledC = "isVfsEnabled";
-constexpr auto launchOnSystemStartupC = "launchOnSystemStartup";
-constexpr auto optionalServerNotificationsC = "optionalServerNotifications";
-constexpr auto promptDeleteC = "promptDeleteAllFiles";
-constexpr auto showCallNotificationsC = "showCallNotifications";
-constexpr auto showChatNotificationsC = "showChatNotifications";
-constexpr auto showInExplorerNavigationPaneC = "showInExplorerNavigationPane";
}
}
ConfigFile configFile;
- configFile.setVfsEnabled(settings->value(QLatin1String(isVfsEnabledC)).toBool());
- configFile.setLaunchOnSystemStartup(settings->value(QLatin1String(launchOnSystemStartupC)).toBool());
- configFile.setOptionalServerNotifications(settings->value(QLatin1String(optionalServerNotificationsC)).toBool());
- configFile.setPromptDeleteFiles(settings->value(QLatin1String(promptDeleteC)).toBool());
- configFile.setShowCallNotifications(settings->value(QLatin1String(showCallNotificationsC)).toBool());
- configFile.setShowChatNotifications(settings->value(QLatin1String(showChatNotificationsC)).toBool());
- configFile.setShowInExplorerNavigationPane(settings->value(QLatin1String(showInExplorerNavigationPaneC)).toBool());
+ configFile.setVfsEnabled(settings->value(configFile.isVfsEnabledC).toBool());
+ configFile.setLaunchOnSystemStartup(settings->value(configFile.launchOnSystemStartupC).toBool());
+ configFile.setOptionalServerNotifications(settings->value(configFile.optionalServerNotificationsC).toBool());
+ configFile.setPromptDeleteFiles(settings->value(configFile.promptDeleteC).toBool());
+ configFile.setShowCallNotifications(settings->value(configFile.showCallNotificationsC).toBool());
+ configFile.setShowChatNotifications(settings->value(configFile.showChatNotificationsC).toBool());
+ configFile.setShowInExplorerNavigationPane(settings->value(configFile.showInExplorerNavigationPaneC).toBool());
ClientProxy().saveProxyConfigurationFromSettings(*settings);
// Try to load the single account.
static constexpr char fullLocalDiscoveryIntervalC[] = "fullLocalDiscoveryInterval";
static constexpr char notificationRefreshIntervalC[] = "notificationRefreshInterval";
static constexpr char monoIconsC[] = "monoIcons";
-static constexpr char promptDeleteC[] = "promptDeleteAllFiles";
static constexpr char deleteFilesThresholdC[] = "deleteFilesThreshold";
static constexpr char crashReporterC[] = "crashReporter";
-static constexpr char optionalServerNotificationsC[] = "optionalServerNotifications";
-static constexpr char showCallNotificationsC[] = "showCallNotifications";
-static constexpr char showChatNotificationsC[] = "showChatNotifications";
-static constexpr char showInExplorerNavigationPaneC[] = "showInExplorerNavigationPane";
static constexpr char skipUpdateCheckC[] = "skipUpdateCheck";
static constexpr char autoUpdateCheckC[] = "autoUpdateCheck";
static constexpr char updateCheckIntervalC[] = "updateCheckInterval";
static constexpr char updateChannelC[] = "updateChannel";
static constexpr char overrideServerUrlC[] = "overrideServerUrl";
static constexpr char overrideLocalDirC[] = "overrideLocalDir";
-static constexpr char isVfsEnabledC[] = "isVfsEnabled";
static constexpr char geometryC[] = "geometry";
static constexpr char timeoutC[] = "timeout";
static constexpr char chunkSizeC[] = "chunkSize";
static constexpr char logFlushC[] = "logFlush";
static constexpr char showExperimentalOptionsC[] = "showExperimentalOptions";
static constexpr char clientVersionC[] = "clientVersion";
-static constexpr char launchOnSystemStartupC[] = "launchOnSystemStartup";
static constexpr char proxyHostC[] = "Proxy/host";
static constexpr char proxyTypeC[] = "Proxy/type";
bool ConfigFile::optionalServerNotifications() const
{
QSettings settings(configFile(), QSettings::IniFormat);
- return settings.value(QLatin1String(optionalServerNotificationsC), true).toBool();
+ return settings.value(optionalServerNotificationsC, true).toBool();
}
bool ConfigFile::showChatNotifications() const
{
const QSettings settings(configFile(), QSettings::IniFormat);
- return settings.value(QLatin1String(showChatNotificationsC), true).toBool() && optionalServerNotifications();
+ return settings.value(showChatNotificationsC, true).toBool() && optionalServerNotifications();
}
void ConfigFile::setShowChatNotifications(const bool show)
{
QSettings settings(configFile(), QSettings::IniFormat);
- settings.setValue(QLatin1String(showChatNotificationsC), show);
+ settings.setValue(showChatNotificationsC, show);
settings.sync();
}
bool ConfigFile::showCallNotifications() const
{
const QSettings settings(configFile(), QSettings::IniFormat);
- return settings.value(QLatin1String(showCallNotificationsC), true).toBool() && optionalServerNotifications();
+ return settings.value(showCallNotificationsC, true).toBool() && optionalServerNotifications();
}
void ConfigFile::setShowCallNotifications(bool show)
{
QSettings settings(configFile(), QSettings::IniFormat);
- settings.setValue(QLatin1String(showCallNotificationsC), show);
+ settings.setValue(showCallNotificationsC, show);
settings.sync();
}
#endif
;
QSettings settings(configFile(), QSettings::IniFormat);
- return settings.value(QLatin1String(showInExplorerNavigationPaneC), defaultValue).toBool();
+ return settings.value(showInExplorerNavigationPaneC, defaultValue).toBool();
}
void ConfigFile::setShowInExplorerNavigationPane(bool show)
{
QSettings settings(configFile(), QSettings::IniFormat);
- settings.setValue(QLatin1String(showInExplorerNavigationPaneC), show);
+ settings.setValue(showInExplorerNavigationPaneC, show);
settings.sync();
}
void ConfigFile::setOptionalServerNotifications(bool show)
{
QSettings settings(configFile(), QSettings::IniFormat);
- settings.setValue(QLatin1String(optionalServerNotificationsC), show);
+ settings.setValue(optionalServerNotificationsC, show);
settings.sync();
}
bool ConfigFile::promptDeleteFiles() const
{
QSettings settings(configFile(), QSettings::IniFormat);
- return settings.value(QLatin1String(promptDeleteC), false).toBool();
+ return settings.value(promptDeleteC, false).toBool();
}
void ConfigFile::setPromptDeleteFiles(bool promptDeleteFiles)
{
QSettings settings(configFile(), QSettings::IniFormat);
- settings.setValue(QLatin1String(promptDeleteC), promptDeleteFiles);
+ settings.setValue(promptDeleteC, promptDeleteFiles);
}
int ConfigFile::deleteFilesThreshold() const
bool ConfigFile::launchOnSystemStartup() const
{
QSettings settings(configFile(), QSettings::IniFormat);
- return settings.value(QLatin1String(launchOnSystemStartupC), true).toBool();
+ return settings.value(launchOnSystemStartupC, true).toBool();
}
void ConfigFile::setLaunchOnSystemStartup(const bool autostart)
{
QSettings settings(configFile(), QSettings::IniFormat);
- settings.setValue(QLatin1String(launchOnSystemStartupC), autostart);
+ settings.setValue(launchOnSystemStartupC, autostart);
}
bool ConfigFile::serverHasValidSubscription() const